package cn.luyifushi.sys.service.impl;

import cn.luyifushi.sys.entity.User;
import cn.luyifushi.sys.dao.UserMapper;
import cn.luyifushi.sys.service.UserService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
/**
 * @author sword-l
 * @version 1.0.0
 * @title UserServiceImpl
 * @description
 **/
@Service
@Transactional
public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements
        UserService {


    /**
     * 根据用户名查询用户
     *
     * @param userame
     * @return
     */
    @Override
    public User findUserByUserName(String userame) {
        QueryWrapper<User> queryWrapper=new QueryWrapper<User>();
        queryWrapper.eq("username",userame);
        return baseMapper.selectOne(queryWrapper);
    }
}
